#!/bin/bash

# ----------------------------------------------------------------------
# Filename:   sysstat-sar.sh
# Version:    1.0
# Date:       2014/09/24
# Author:     jinzhao.wang	
# Email:      jinzhao.wang@cs2c.com.cn
# Summary:    02系统基本功能-02系统管理功能-16系统和系统服务管理-03系统状态收集工具sysstat-01sar监控操作系统性能
# Notes:      sar命令
# Copyright:  China Standard Software Co., Ltd.
# History：     
#             Version 1.0, 2014/09/24
#             -   The first one
#             Version 1.1, 2014/11/24
#             -   The second one;
#             -   Add SFROOT;
# ----------------------------------------------------------------------

if [ -z "$SFROOT" ]
then
    CMDLIB=./
    SFROOT=./
else
    CMDLIB=${SFROOT}/testcases/Management_Function/system_service_management
fi

. ${SFROOT}/lib/Echo.sh
. ${SFROOT}/lib/XmlParse.sh

LANG=en_US.UTF-8

echo $LANG

function CleanData ()
{
  EchoInfo "sysstat-sar.sh执行完毕"
}

trap "CleanData" EXIT INT
#确定系统已安装sysstat软件包
EchoInfo "确定系统已安装sysstat软件包"
rpm -q sysstat
EchoResult "系统安装了sysstat软件包"
sar 1 2 
EchoResult "sar正确显示操作系统性能数据"
